<!doctype html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta charset="utf-8">
    <title>博文页</title>
    <tc_include file="Public:head" />
    <link rel="stylesheet" href="__TMPL__Public/invest/css/blog.css">


</head>

<body>
<nav class="navbar navbar-default" role="navigation">
    <tc_include file="Public:nav" /><!-- /.container-fluid -->
</nav>
<div  class="container content">
    <div class="col-md-8 col-sm-8 col-xs-8 left">
        <div class="right-er">
            <div class="left">
                <div class="up-box" id="contents">
                    <php>
                        $lists = sp_sql_posts_paged("cid:$cat_id;order:post_date DESC;",10);
                        $user = M('Users')->where(array('user_type'=>3))->getField('id,user_nicename,avatar',true);
                        foreach ($lists['posts'] as $k=>$vule){
                            $lists['posts'][$k]['user_nicename'] = $user[$vule['uid']]['user_nicename'];
                            $lists['posts'][$k]['avatar'] = $user[$vule['uid']]['avatar'];
                        }

                    </php>
                    <volist name="lists['posts']" id="vo">
                        <php>
                            $smeta=json_decode($vo['smeta'], true);
                        </php>
                        <div class="up-photo contentlist xian">
                            <div class="col-md-12 col-sm-12 col-xs-12 dd">
                                <h2><a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}">{$vo.post_title}</a></h2>
                                <p class="wenzi">{$vo.post_excerpt|msubstr=0,256}</p>
                                <p class="dd-p pull-left">
                                    <a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}" class="a-img">
                                        <if condition="empty($vo['avatar'])">
                                            <img src="__TMPL__Public/assets/images/default_tupian4.png" class="img-responsive" />
                                            <else />
                                            <img src="{:sp_get_image_url($vo['avatar'])}" class="img-responsive img-thumbnail"  />
                                        </if>
                                    </a>
                                    <a href="#" class="name">{$vo.user_nicename}</a>
                                </p>
                                <ul class="down-tip pull-right">
                                    <li><span class="yollew">{$vo.post_hits}</span>阅读</li>
                                    <li>{$vo.post_modified}</li>
                                </ul>
                            </div>
                        </div>
                    </volist>
                </div>
                <ul class="pagination right pagination-b">
                    {$lists['page']}
                </ul>
            </div>
        </div>

    </div>
    <div class="col-md-4 col-sm-4 col-xs-4 right-da">
        <div class="right-a">
            <a href="#"><img src="__TMPL__Public/invest/images/r-tip.jpg" /></a>
        </div>
        <div class="right-b">
            <a href="#"><img src="__TMPL__Public/invest/images/right-1.jpg"/></a>
        </div>
        <div class="right-c">
            <ul class="right-c-li">
                <div class="b-left"> <i></i></div>
                <h3>热门博文
                    <!--<p class=" pull-right u-floatRight hot-nav">-->
                        <!--<span class="is-active" data-action="bookmark">收藏</span>-->
                        <!--<span data-action="comments">评论</span>-->
                        <!--<span data-action="likes">点赞</span>-->
                    <!--</p>-->
                </h3>
                <php>
                    $hot_articles=sp_sql_posts("cid:$portal_hot_articles;field:post_title,post_excerpt,object_id,term_id,smeta;order:post_hits desc;limit:5;");

                </php>
                <div class="clearfix"></div>
                <foreach name="hot_articles" item="vo">
                <li><i class="aa bb">{$key+1}</i><a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}">8月15日丨{$vo.post_title}</a></li>
                </foreach>

            </ul>
        </div>
        <div class="right-a">
            <a href="#"><img src="__TMPL__Public/invest/images/r-tip.jpg" /></a>
        </div>
        <div class="right-b">
            <a href="#"><img src="__TMPL__Public/invest/images/right-1.jpg"/></a>
        </div>
    </div>
</div>


<!--第七块footer-->
<div class="clearfix"></div>
<div class="footer">
    <tc_include file="Public:footer" />
</div>

</body>
</html>

<tc_include file="Public:scripts" />
